<div class="heading">
	<h3><?php echo $judul_tabel; ?></h3>                    

	<div class="resBtnSearch">
		<a href="#"><span class="icon16 icomoon-icon-search-3"></span></a>
	</div>

	<div class="search">

		<form id="searchform" action="search.html">
			<input type="text" id="tipue_search_input" class="top-search" placeholder="Search here ..." />
			<input type="submit" id="tipue_search_button" class="search-btn" value=""/>
		</form>

	</div><!-- End search -->
	
	<ul class="breadcrumb">
		<li>You are here:</li>
		<li>
			<a href="<?php echo base_url(); ?>app_permintaan" class="tip" title="Kembali ke List Permintaan Barang">
				<span class="icon16 icomoon-icon-screen-2"></span>
			</a> 
			<span class="divider">
				<span class="icon16 icomoon-icon-arrow-right-2"></span>
			</span>
		</li>
		<li class="active">View Laporan</li>
	</ul>

</div>

<!-- Build page from here: -->

<div class="row-fluid">

	<div class="span12">

		<div class="box gradient invoice">

			<div class="title clearfix">

				<h4 class="left">
					<span></span>
				</h4>
				<div class="print">
					<a href="#" class="tip" title="Print invoice"><span class="icon24 icomoon-icon-printer-2"></span></a>
				</div>
				 <div class="invoice-info">
					<span class="number">Laporan <strong class="red">#<?php echo $permintaan["kd_fpb"]; ?></strong></span>
					<span class="data gray"><?php echo $permintaan["tgl_fpb"]; ?></span>
					<div class="clearfix"></div>
				</div>

			</div>
			<div class="content">
				<div class="you">
					<ul class="unstyled">
						<li><h3>Kantor Pusat</h3></li>
						<li><span class="icon16 icomoon-icon-arrow-right-2"></span><?php echo $datapusat["alamat"]; ?></li>
						<li><span class="icon16 icomoon-icon-arrow-right-2"></span><?php echo $datapusat["kota"]; ?></li>
						<li><span class="icon16 icomoon-icon-arrow-right-2"></span>Phone: <strong class="red"><?php echo $datapusat["telepon"]; ?></strong></li>
						<li><span class="icon16 icomoon-icon-arrow-right-2"></span>Fax: <strong class="red"><?php echo $datapusat["fax"]; ?></strong></li>
					</ul>
				</div>
				<div class="client">
					<ul class="unstyled">
						<li><h3><?php echo $permintaan["nm_kantor"]; ?></h3></li>
						<li><span class="icon16 icomoon-icon-arrow-right-2"></span><?php echo $permintaan["alamat"]; ?></li>
						<li><span class="icon16 icomoon-icon-arrow-right-2"></span><?php echo $permintaan["kota"]; ?></li>
						<li><span class="icon16 icomoon-icon-arrow-right-2"></span>Phone: <strong class="red"><?php echo $permintaan["telepon"]; ?></strong></li>
						<li><span class="icon16 icomoon-icon-arrow-right-2"></span>Fax: <strong class="red"><?php echo $permintaan["fax"]; ?></strong></li>

					</ul>
				</div>
				<div class="clearfix"></div>

				<table class="responsive table table-bordered">
					<thead>
					  <tr>
						<th>#</th>
						<th>Kode Barang</th>
						<th>Nama Barang</th>
						<th>Jumlah</th>
						<th>Harga</th>
						<th>Sub Total</th>
					  </tr>
					</thead>
					<tbody>
						<?php
						$loop = 1;
						$total = 0;
						foreach($permintaan_detail as $detail){
							echo "<tr>
									  <td>".$loop."</td>
									  <td>".$detail["kd_barang"]."</td>
									  <td>".$detail["nm_barang"]."</td>
									  <td>".$detail["jumlah_app"]."</td>
									  <td style='text-align:right;'>Rp. ".$detail["harga_app"]."</td>
									  <td style='text-align:right;'>Rp. ".(intval($detail["jumlah_app"])*intval($detail["harga_app"]))."</td>
								</tr>";
							
							$total += (intval($detail["jumlah_app"])*intval($detail["harga_app"]));
							$loop++;
						}
						?>
					</tbody>
				</table>

				<div class="payment">
					<?php
					if($permintaan["status_fpb"]==1)
						$status="Permintaan";
					else if($permintaan["status_fpb"]==2)
						$status="Perbaikan";
					else if($permintaan["status_fpb"]==3)
						$status="Disetujui";
					else if($permintaan["status_fpb"]==4)
						$status="Pembelian";
					else if($permintaan["status_fpb"]==5)
						$status="Pengiriman";
					else if($permintaan["status_fpb"]=6)
						$status="Penerimaan";
					?>
					<ul class="unstyled">
						<li><h3>Status Permintaan: <span class="red"><?php echo $status ?></span></h3></li>
					</ul>
				</div>
				
				<div class="total">
					<h4>Total &nbsp;&nbsp;&nbsp;<span class="red">Rp. <?php echo $total; ?></span></h4>
				</div>


				<div class="clearfix"></div>

				<div class="invoice-footer">
					
				</div>
			   
			</div>

		</div><!-- End .box -->

	</div>

</div><!-- End .row-fluid -->